﻿package Message.Game
{
    import Framework.Serialize.*;
    import Message.Public.*;
    import flash.utils.*;

    public class STask extends Object
    {
        public var code:int;
        public var name:String;
        public var group:int;
        public var loopType:int;
        public var executeCount:int;
        public var canQuickComplete:int;
        public var getNpc:int;
        public var getDistance:int;
        public var endNpc:int;
        public var endDistance:int;
        public var getTalkId:int;
        public var endTalkId:int;
        public var notCompletedTalkId:int;
        public var getChoose:int;
        public var endChoose:int;
        public var guide:int;
        public var guideCompleted:int;
        public var failTalkId:int;
        public var context:String;
        public var describe:String;
        public var processMap:Dictionary;
        public var effect:STaskEffect;
        public var getConditions:Array;
        public var getGiveItemDict:Dictionary;
        public var getAddBuff:Array;
        public var completeConditions:Array;
        public var endChooseItemDict:Dictionary;
        public var rewards:Array;
        public var autoGet:Boolean;
        public var autoGetTalk:int;
        public var autoEnd:Boolean;
        public var autoEndTalk:int;

        public function STask()
        {
            return;
        }// end function

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.code);
            param1.writeString(this.name);
            param1.writeInt(this.group);
            param1.writeInt(this.loopType);
            param1.writeInt(this.executeCount);
            param1.writeInt(this.canQuickComplete);
            param1.writeInt(this.getNpc);
            param1.writeInt(this.getDistance);
            param1.writeInt(this.endNpc);
            param1.writeInt(this.endDistance);
            param1.writeInt(this.getTalkId);
            param1.writeInt(this.endTalkId);
            param1.writeInt(this.notCompletedTalkId);
            param1.writeInt(this.getChoose);
            param1.writeInt(this.endChoose);
            param1.writeInt(this.guide);
            param1.writeInt(this.guideCompleted);
            param1.writeInt(this.failTalkId);
            param1.writeString(this.context);
            param1.writeString(this.describe);
            DictSeqProcessHelper.write(param1, this.processMap);
            this.effect.__write(param1);
            SeqConditonHelper.write(param1, this.getConditions);
            DictIntIntHelper.write(param1, this.getGiveItemDict);
            SeqIntHelper.write(param1, this.getAddBuff);
            SeqConditonHelper.write(param1, this.completeConditions);
            DictIntIntHelper.write(param1, this.endChooseItemDict);
            SeqTaskRewardHelper.write(param1, this.rewards);
            param1.writeBool(this.autoGet);
            param1.writeInt(this.autoGetTalk);
            param1.writeBool(this.autoEnd);
            param1.writeInt(this.autoEndTalk);
            return;
        }// end function

        public function __read(param1:SerializeStream) : void
        {
            this.code = param1.readInt();
            this.name = param1.readString();
            this.group = param1.readInt();
            this.loopType = param1.readInt();
            this.executeCount = param1.readInt();
            this.canQuickComplete = param1.readInt();
            this.getNpc = param1.readInt();
            this.getDistance = param1.readInt();
            this.endNpc = param1.readInt();
            this.endDistance = param1.readInt();
            this.getTalkId = param1.readInt();
            this.endTalkId = param1.readInt();
            this.notCompletedTalkId = param1.readInt();
            this.getChoose = param1.readInt();
            this.endChoose = param1.readInt();
            this.guide = param1.readInt();
            this.guideCompleted = param1.readInt();
            this.failTalkId = param1.readInt();
            this.context = param1.readString();
            this.describe = param1.readString();
            this.processMap = DictSeqProcessHelper.read(param1);
            this.effect = new STaskEffect();
            this.effect.__read(param1);
            this.getConditions = SeqConditonHelper.read(param1);
            this.getGiveItemDict = DictIntIntHelper.read(param1);
            this.getAddBuff = SeqIntHelper.read(param1);
            this.completeConditions = SeqConditonHelper.read(param1);
            this.endChooseItemDict = DictIntIntHelper.read(param1);
            this.rewards = SeqTaskRewardHelper.read(param1);
            this.autoGet = param1.readBool();
            this.autoGetTalk = param1.readInt();
            this.autoEnd = param1.readBool();
            this.autoEndTalk = param1.readInt();
            return;
        }// end function

    }
}
